﻿@using System.Data
@using ZoomLa.Common
@using ZoomLa.Model
@using ZoomLa.BLL
@using ZoomLa.BLL.Page
@using ZoomLaCMS.Models.Common
@model ZoomLaCMS.Models.Common.VM_Recursion
@functions{
    VM_Recursion reMod=null;
    public int GetTotalArtCount()
    {
        if (reMod.alldt == null || reMod.alldt.Rows.Count < 1)
        {
            return 0;
        }
        return DataConverter.CLng(reMod.alldt.Compute("SUM(ArtCount)", ""));
    }
}
@{
    reMod=ViewBag.reMod;
    int Mid = ViewBag.Mid;
  
}
@section head{
    <title>栏目管理</title>
}
@section content{
<div class="container-fluid mysite" id="BreadDiv">
    <div class="row">
        <ol id="BreadNav" class="breadcrumb navbar-fixed-top">
            <li><a href="@(CustomerPageAction.customPath2)Main.aspx">工作台</a></li>
            <li><a href='ApplyAudit'>企业黄页</a>
            <li class='active'>黄页栏目</li>
        </ol>
    </div>
</div>
    <table class="table table-striped table-bordered">
        <tr>
            <td class="td_s"><span>ID</span></td>
            <td><span>栏目名称</span></td>
            <td class="td_m"><span>内容数</span></td>
            <td class="td_m"><span>节点类型</span></td>
            <td class="td_m"><span>启用状态</span></td>
            <td class="td_l"><span>相关操作</span></td>
        </tr>
        <tr>
            <td>0</td>
            <td><a href="javascrip:;"><span class="fa fa-folder-open"></span><span>根栏目(@ViewBag.title)</span></a></td>
            <td class="text-center">@GetTotalArtCount()</td>
            <td>根栏目</td>
            <td><span class="rd_green">启用</span></td>
            <td>
                <a href="PageTemplateAdd?RegID=@Mid" class="option_style"><i class="fa fa-plus-square"></i>添加</a> <a href="javascript:;" onclick="ShowOrder(0);" class="option_style"><i class="fa fa-exchange"></i>排序</a>
            </td>
        </tr>
        @Html.Partial("PageTemplate_List", reMod)
    </table>
}
@section script{
<script src="/JS/Controls/ZL_Dialog.js"></script>
<script>
    $(function () {
        //initTempFiles();
    });
    function ShowOrder(pid) {
        ShowComDiag("SetPageOrder?id=" + pid, "栏目排序");
    }

</script>
}
